#!/bin/sh
   
echo  "  certbot:
    image: certbot/certbot
    depends_on:
      - nginx
    # Check for certificate renewal every 12h as
    # recommended by Let's Encrypt
    entrypoint: /bin/sh -c 'trap exit TERM;
                            while :; do
                                certbot renew > /dev/null;
                                sleep 12h & wait \$\${!};
                            done'
    volumes:
      - ./docker/certbot/www:/var/www/certbot
      - ./docker/certbot/.files:/etc/letsencrypt\n" >> docker-compose.yaml